//public class TestClass {
////    public static void main(String[] args) {
////        String s1 = "hello";
////        String s2 = "HELLO";
////        // 小写转大写
////        System.out.println(s1.toUpperCase());
////        // 大写转小写
////        System.out.println(s2.toLowerCase());
////    }
////
//
////    public static void main(String[] args) {
////        String s = "hello";
////        // 字符串转数组
////        char[] ch = s.toCharArray();
////        for (int i = 0; i < ch.length; i++) {
////            System.out.print(ch[i]);
////        }
////        System.out.println();
////        // 数组转字符串
////        String s2 = new String(ch);
////        System.out.println(s2);
////    }
//
////    public static void main(String[] args) {
////        String s = String.format("%d-%d-%d", 2023, 11, 23);
////        System.out.println(s);
////        String str = "helloworld" ;
////        System.out.println(str.replaceAll("l", "_"));
////        System.out.println(str.replaceFirst("l", "_"));
////    }
////
//
////    public static void main(String[] args) {
////
////        String str1 = "helloworld" ;
////        System.out.println(str1.replaceAll("l", "_"));
////
////        String str2 = "helloworld" ;
////        System.out.println(str2.replaceFirst("l", "_"));
////    }
//
////    public static void main(String[] args) {
////        String str = "hello world hello friend" ;
////        //String[] result = str.split(" ") ;
////        String[] result = str.split(" ",2) ;
////        for(String s: result) {
////            System.out.println(s);
////        }
////
////    }
//
////    public static void main(String[] args) {
////        String str = "192.168.1.1" ;
////        String[] result = str.split("\\.") ;
////        for(String s: result) {
////            System.out.println(s);
////        }
////    }
//
//    //    public static void main(String[] args) {
////        String str = "name=zhangsan&age=18" ;
////        String[] result = str.split("&") ;
////        for (int i = 0; i < result.length; i++) {
////            String[] temp = result[i].split("=") ;
////            System.out.println(temp[0]+" = "+temp[1]);
////        }
////    }
////
//    public static void main(String[] args) {
//        String str = "helloworld";
//        System.out.println(str.substring(5));
//        System.out.println(str.substring(0, 5));
//    }
//
//}